package com.mybpm.core.definition


import grails.compiler.GrailsCompileStatic
import groovy.transform.ToString

/**
 * 环节定义
 */
@GrailsCompileStatic
@ToString(includes = 'id,name', includeNames = true, includePackage = false)
class Node {
    /** 环节id */
    String nid
    /** 环节定义名称 */
    String name
    /** 环节显示名称 */
    String displayName
    /** 环节类型 */
    String type

    Date dateCreated;
    Date lastUpdated;

    static belongsTo = [process: Process]
    static hasMany = [transitions: Transition]

    static constraints = {
        nid nullable: false, blank: false, length: 200
        name nullable: false, blank: false, length: 100
        displayName nullable: true, length: 100
        type nullable: true, length: 50
    }

    static mapping = {
        table 'bpm_d_node'
        version false
    }

}
